<?php
class Admin_Form_Login extends Zend_Form{
    
    public function init(){       
        $this->setAction('login');        
        $user=new Zend_Form_Element_Text('username');        
        $user->setRequired(true)->addValidator('NotEmpty')
            ->removeDecorator('HtmlTag')->removeDecorator('Label');
        
        $pass=new Zend_Form_Element_Password('password');                
        $pass->setRequired(true)->addValidator('NotEmpty')                                  
            ->removeDecorator('HtmlTag')->removeDecorator('Label');        
            
        $sm=new Zend_Form_Element_Button('submit');
        $sm->setAttrib('type','submit')->setAttrib('class','login-button');
        $sm->setLabel('Accept')
            ->removeDecorator('dtddwrapper');                                         
        
        $this->setDecorators(array(
                                   array('viewScript',
                                   array('viewScript'=>'/template/form_login.phtml'),
                                )));                        
           
        $this->addElements(array($user,$pass,$sm));
        
                                          
    }
}